package com.amir.common.weight

import android.content.Context
import com.scwang.smartrefresh.layout.header.ClassicsHeader
import java.util.*

open class CustomRefreshHeader(context: Context, tag: String) : ClassicsHeader(context) {
    init {
        KEY_LAST_UPDATE_TIME = tag
        if (mShared == null) {
            mShared = context.getSharedPreferences("ClassicsHeader", Context.MODE_PRIVATE)
        }
        setLastUpdateTime(Date(mShared.getLong(KEY_LAST_UPDATE_TIME, System.currentTimeMillis())))
    }
}